python Programming Glossary: n^2
Any reason not to use + to concatenate two strings? http://stackoverflow.com/questions/10043636/any-reason-not-to-use-to-concatenate-two-strings though that concatenating more than 2 strings with is an O n^2 operation compared to O n for join and thus becomes inefficient... this has not to do with using a loop. Even a b c ... is O n^2 the reason being that each concatenation produces a new string...
Why is the same SQLite query being 30 times slower when fetching only twice as many results? http://stackoverflow.com/questions/10531898/why-is-the-same-sqlite-query-being-30-times-slower-when-fetching-only-twice-as-m to a 2d dimension the rtMin rtMax mzMin mzMax will take n^2 time. This roughly corresponds to the second fetchall taking..
Cython and numpy speed http://stackoverflow.com/questions/1199972/cython-and-numpy-speed you dramatic speed gains by converting the problem from O n^2 to O n log n . This is particularly useful for long data sets..
A Fast Prime Number Sieve in Python http://stackoverflow.com/questions/16004407/a-fast-prime-number-sieve-in-python be indeed. Having a toy generator with ~ n^1.5 or even ~ n^2 orders of growth is just no fun to play with. share improve..
Clustering text in Python http://stackoverflow.com/questions/1789254/clustering-text-in-python
Longest equally-spaced subsequence http://stackoverflow.com/questions/18159911/longest-equally-spaced-subsequence thank you . However it is clear already that using n^2 memory will not work. So far there is no code that terminates..
Good way to append to a string http://stackoverflow.com/questions/4435169/good-way-to-append-to-a-string amortized O n eg s for i in range n s str n used to be O n^2 but now it is O n From the source bytesobject.c void PyBytes_ConcatAndDel..
Dictionary runtime (Codility Test) http://stackoverflow.com/questions/8623924/dictionary-runtime-codility-test
|